﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ResxCrunch.Utils
{
    /// <summary>
    /// Contains all the enumerations used in the project
    /// </summary>
    public class Enums
    {
        /// <summary>
        /// Formats the data can be stored to or loaded from
        /// </summary>
        public enum Format
        {
            /// <summary>
            /// Comma separated values
            /// </summary>
            Csv,

            /// <summary>
            /// Resource file
            /// </summary>
            Resource,

            /// <summary>
            /// Resource file group
            /// </summary>
            ResourceGroup,

            /// <summary>
            /// Resx file
            /// </summary>
            Resx,

            /// <summary>
            /// Resx file group
            /// </summary>
            ResxGroup,

            /// <summary>
            /// eXtensible Markup Format
            /// </summary>
            Xml,

            /// <summary>
            /// Android group format
            /// </summary>
            AndroidGroup,

            /// <summary>
            /// Blackberry group format
            /// </summary>
            BlackberryGroup,

            /// <summary>
            /// None of the above
            /// </summary>
            None
        }

        /// <summary>
        /// Load form modes
        /// </summary>
        public enum LoadModes
        {
            /// <summary>
            /// Normal data load
            /// </summary>
            Data,

            /// <summary>
            /// Additional data mode
            /// </summary>
            Additional,

            /// <summary>
            /// Patch data mode
            /// </summary>
            Patch
        }

        /// <summary>
        /// Gets the CVS separators list.
        /// </summary>
        /// <value>CVS separators list</value>
        public static List<string> CvsSeparators
        {
            get
            {
                List<string> separators = new List<string>();
                separators.Add(",");
                separators.Add(";");
                separators.Add("|");
                separators.Add("\t");

                return separators;
            }
        }

        /// <summary>
        /// Gets the CVS separator labels.
        /// </summary>
        /// <value>The CVS separator labels.</value>
        public static List<string> CvsSeparatorLabels
        {
            get
            {
                List<string> separators = new List<string>();
                separators.Add("Comma ( , )");
                separators.Add("Semicolon ( ; )");
                separators.Add("Vertical line ( | )");
                separators.Add("Tab");

                return separators;
            }
        }

        /// <summary>
        /// Default columns that exist in the datatable containing strict resx data
        /// </summary>
        public class DataColumn
        {
            /// <summary>
            /// Gets the name of the Nr column, containing the number of the loaded record
            /// </summary>
            public const string Nr = "Nr";

            /// <summary>
            /// Gets the name of the Directory column, containing the relative path to the original resx
            /// </summary>
            public const string Directory = "Directory";

            /// <summary>
            /// Gets the name of the File column, containing the name of the resx
            /// </summary>
            public const string File = "File";

            /// <summary>
            /// Gets the name of the resx key
            /// </summary>
            public const string Key = "Key";

            /// <summary>
            /// Gets the name of the default value column containg the value from the default resx file
            /// </summary>
            public const string DefaultValue = "Default value";
        }

        /// <summary>
        /// Default columns that exist in the datatable containing language data
        /// </summary>
        public class LanguageDataColumn
        {
            /// <summary>
            /// Gets the name of the Code column
            /// </summary>
            public const string Code = "Code";

            /// <summary>
            /// Gets the name of the Language column
            /// </summary>
            /// <value>The language.</value>
            public const string Language = "Language";
        }

        /// <summary>
        ///  Default columns that exist in the datatable containing Filters
        /// </summary>
        public class FilterTableDataColumn
        {
            /// <summary>
            /// Gets the name of the Filter value column
            /// </summary>
            public const string Filter = "Filter";
        }
    }
}
